#ifndef __DTK_TYPES_H__
#define __DTK_TYPES_H__

typedef char                DInt8;
typedef unsigned char       DUInt8;
typedef short               DInt16;
typedef unsigned short      DUInt16;
typedef int                 DInt;
typedef unsigned int        DUInt;
typedef long                DLong;
typedef unsigned long       DULong;
typedef long long           DInt64;
typedef unsigned long long  DUInt64;
typedef float               DFloat;
typedef double              DDouble;
typedef void*               DPointer;

typedef char* DString;
typedef DUInt DUniChar;

typedef enum {
    DTK_FALSE = 0,
    DTK_TRUE = 1
}DBoolean;

typedef struct {
    DInt      x;
    DInt      y;
}DPoint;

typedef struct {
    DInt        w;
    DInt        h;
}DSize;

typedef struct {
    DInt      x;
    DInt      y;
    DInt      width;
    DInt      height;
}DRectangle;

typedef struct {
    DInt      x1;
    DInt      y1;
    DInt      x2;
    DInt      y2;
}DRegion;

typedef struct {
    DUInt8    red;
    DUInt8    green;
    DUInt8    blue;
    DUInt8    alpha;
}DColor;

typedef struct {
    DInt    left;
    DInt    top;    
    DInt    right;
    DInt    bottom;
}DThickness;

typedef enum {
    DTK_INIT_SUCCESS        = 1,
    DTK_INIT_ERROR_UNKNOWN  = 0,
    DTK_INIT_ERROR_THREADS  = -1,
    DTK_INIT_ERROR_INTERNAL = -2
}DTKInitError;

typedef enum {
    DACAPS_NONE = 0,
    DACAPS_HASCONTENT = 0x01
}DTKActorCaps;

typedef enum {
    DTK_VERTICAL        = 0,
    DTK_HORIZONTAL      = 1
}DTKOrientation;

typedef enum {
    D_TYPE_INVALID      = 0,
    D_TYPE_NONE         = 1,
    D_TYPE_BOOLEAN,
    D_TYPE_INT8,
    D_TYPE_UINT8,
    D_TYPE_INT16,
    D_TYPE_UINT16,
    D_TYPE_INT,
    D_TYPE_UINT,
    D_TYPE_LONG,
    D_TYPE_ULONG,
    D_TYPE_INT64,
    D_TYPE_UINT64,
    D_TYPE_ENUM,
    D_TYPE_FLAGS,
    D_TYPE_FLOAT,
    D_TYPE_DOUBLE,
    D_TYPE_STRING,
    D_TYPE_POINTER,
    D_TYPE_PARAM,
    D_TYPE_COLOR
}D_VALUE_TYPE;


extern const DString DTK_TYPE_STAGE;
extern const DString DTK_TYPE_SCENE;
extern const DString DTK_TYPE_LINE;
extern const DString DTK_TYPE_RECTANGLE;
extern const DString DTK_TYPE_TEXT;
extern const DString DTK_TYPE_BUTTON;
extern const DString DTK_TYPE_CONTAINER;
extern const DString DTK_TYPE_BUTTON;

extern const DString DTK_LAYOUT_TYPE_NORMAL;

typedef struct _dtk_object          DTKObject;
typedef struct _dtk_actor           DTKActor;
typedef struct _dtk_container       DTKContainer;
typedef struct _dtk_single          DTKSingle;
typedef struct _dtk_group           DTKGroup;
typedef struct _dtk_stage           DTKStage;
typedef struct _dtk_scene           DTKScene;
typedef struct _dtk_texture         DTKTexture;
typedef struct _dtk_text            DTKText;
typedef struct _dtk_rectangle       DTKRectangle;
typedef struct _dtk_line            DTKLine;
typedef struct _dtk_box             DTKBox;


typedef struct _dtk_gc              DTKGC;
typedef struct _dtk_layout          DTKLayout;


typedef struct _dtk_button          DTKButton;

typedef struct _dtk_stage_description DTKStageDescription;

typedef struct _dtk_timeline DTKTimeLine;


typedef void (*DTKCallback) (DTKActor *actor, void* data);

#endif
